$(document).ready(function() {  
	 $("#updateBtn").click(function () {
		 $(".error").hide();
		 if ($(":text[value=]").length != 0 ) {
				$("#validation")
				.after(
						'<span class="error" style="color: red">Please fill a Topic Name.</span>');
		      return false;
		 }else{
			 $("form").attr('action',contextRoot+"/topicdetails/update.html")
		 }
	 });
	 
	 $("#addBtn").click(function () {
		 $("form").attr('action',contextRoot+"/topicdetails/add.html")
	 });
	});
